package org.bjf.modules.user.service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.bjf.modules.core.service.BaseService;
import org.bjf.modules.user.bean.User;
import org.bjf.modules.user.mapper.UserMapper;
import org.springframework.stereotype.Service;

/**
 * @author bjf
 * @date 2017/11/27
 */
@Service
@Slf4j
public class UserService extends BaseService<UserMapper, User> {


  @Override
  protected EntityWrapper<User> buildQuery(Map<String, String> params) {
    if (params == null) {
      return null;
    }
    EntityWrapper<User> ew = new EntityWrapper<>();
    ew.eq(params.containsKey("phone"), "phone", params.get("phone"));
    return ew;
  }

}
